import { httpGet, httpPost } from '../request.js'


/**
 * @title 获取会话记录
 */
export const imCover = () => httpGet('/imCover')


/**
 * @title 发送消息
 */
export const sendIm = data => httpPost('/im', data)

/**
 * @title 绑定uid
 */
export const bindMessageUid = id => httpGet('/imbind', id)

/**
 * @title 获取邀请面试时间
 */
export const getInterview = id => httpGet('/interview?uid=' + id)


/**
 * @title 获取用户最后一次沟通的职位
 */
export const lastDelivery = (from_id,to_id) => httpGet(`/lastDelivery?from_id=${from_id}&to_id=${to_id}`)

/**
 * @title 获取用户最后一次沟通的职位
 */
export const lastJob = (from_id,to_id) => httpGet(`/lastJob?from_id=${from_id}&to_id=${to_id}`)


/**
 * @title 设置job_id
 */
export const setLastJob = (data) => httpPost('/lastJob', data)


/**
 * @title 获取未读消息数量
 */
export const unread = data => httpGet('/unread', data)